package JUC;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

// 大厂面试题，4个线程交替打印1-100
public class Demo4 {
    static int num = 0;
    public static void main(String[] args) {


    }

    public static void MyAdd(){
//        AtomicInteger atomicInteger = new AtomicInteger();
        num++;
    }
}
class Td1 implements Runnable{
    @Override
    public void run() {
        Lock lock =new ReentrantLock();
        lock.lock();

    }
}